package com.iakuil.poc.web;

import com.iakuil.poc.domain.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DemoController extends BaseController {

    @GetMapping("/hello")
    public String hello() {
        User user = getCurrentUser();
        return String.format("Hello %s!", user == null ? "Guest" : user.getUsername());
    }
}
